import { useI18n } from '@/hooks/web/useI18n'
import { Layout } from '@/router/routerHelper'

const { t } = useI18n()

const asyncRouterMap: AppRouteRecordRaw[] = [
  {
    path: '/home',
    component: Layout,
    redirect: '/home/analysis',
    name: 'Home',
    meta: {
      title: t('router.home'),
      icon: 'ep:home-filled',
      alwaysShow: true
    },
    children: [
      {
        path: 'analysis',
        component: () => import('@/views/Home/Analysis.vue'),
        name: 'Analysis',
        meta: {
          title: t('router.analysis'),
          noCache: true,
          affix: true
        }
      },
      {
        path: 'workplace',
        component: () => import('@/views/Home/Index.vue'),
        name: 'Workplace',
        meta: {
          title: t('router.workplace'),
          noCache: true
        }
      }
    ]
  }
]

export default asyncRouterMap
